/* Copyright 2009 Matthew Lloyd
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSystemTrayIcon>
#include <QTextEdit>
#include <QListWidget>

class QAction;
class QMenu;
class QTextEdit;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow();

protected:

private slots:
    void about();
    void aboutyourdoom();
    bool save();
    bool saveAs();
    void open();
private:
    void createActions();
    void createMenus();
    void createStatusBar();
    void createToolBars();
    void createSysTray();

        
    bool maybeSave();
    void loadFile(const QString &fileName);
    bool saveFile(const QString &fileName);
    void setCurrentFile(const QString &fileName);
    QString strippedName(const QString &fullFileName);

    QString curFile;

    QMenu *helpMenu;
    QMenu *fileMenu;
    QAction *aboutAct;
    QAction *newDockAct;
    QAction *aboutQtAct;
    QAction *doomAct;
    QAction *exitAct;
    QAction *openAct;
    QAction *saveAct;
    QToolBar *fileToolBar;
    QSystemTrayIcon *trayIcon;
    QMenu *trayIconMenu;
    QTextEdit *textEdit;
 };

#endif
